import request from "../utils/request";
// 登录
export const login = (params) => {
  return request.post("/login/", params);
};
//注册
export const registerUser = (params) => {
  return request.post("/register/", params);
};

// 发送邮箱验证码
export const sendCode = (params) => {
  return request.get("/send-email/", { params });
};

// 获取所有博客
export const getAllBlog = (params) => {
  return request.post("/blog/Allbloglist/", params);
};
// 根据id查询博客详情
export const getBlogDetail = (params) => {
  return request.get("/blog/detail/", { params });
};
// 发布博客评论
export const addBlogComment = (params) => {
  return request.post("/blog/addComment/", params);
};
// 点赞博客文章
export const likeArticle = (params) => {
  return request.post("/blog/likeArticle/", params);
};
